home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11466 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.4 KB  |  77 lines

  1. Path: ix.netcom.com!netnews
  2. From: vrhell@ix.netcom.com(Linda Darcy )
  3. Newsgroups: comp.lang.c
  4. Subject: getche error
  5. Date: 24 Mar 1996 16:07:15 GMT
  6. Organization: Netcom
  7. Message-ID: <4j3rvj$8bg@ixnews3.ix.netcom.com>
  8. NNTP-Posting-Host: ix-ron-ny6-26.ix.netcom.com
  9. X-NETCOM-Date: Sun Mar 24  8:07:15 AM PST 1996
  10.  
  11. I was working on app, and I found that as I tried to compile the
  12. program at the end it gave me:
  13.  
  14. Compiling...
  15. c:\msvc\bin\64-1book.c
  16. c:\msvc\bin\64-1book.c(13) : warning C4013: '_cputs' undefined;
  17. assuming extern returning int
  18. c:\msvc\bin\64-1book.c(16) : warning C4013: '_getch' undefined;
  19. assuming extern returning int
  20. c:\msvc\bin\64-1book.c(19) : warning C4013: '_putch' undefined;
  21. assuming extern returning int
  22. Linking...
  23.  
  24. 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__putch' :
  25. unresolved external
  26. 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__cputs' :
  27. unresolved external
  28. 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__getch' :
  29. unresolved external
  30.  
  31.  LINK returned error code 2.
  32. Creating browser database...
  33. 64-1BOOK.EXE - 3 error(s), 3 warning(s)
  34.  
  35. Just so you don't think I'm stupid. I'll also include the code, which
  36. is perfectly valid as I can see. I tried the getchar command, so I
  37. don't believe it's a problem with the header file, and just to play it
  38. safe I had a few other people send me their <conio.h> header. Also, I
  39. thought maybe there was something so small that I wasn't noticing about
  40. the code, that was giving me the error. So I took an example out of the
  41. help files, and tried to compile it with the same errors. I've been
  42. using MSVC++ v1.52 for a long time, but I've never had an error with
  43. it. If there is some sort of error, I'd be greatful for someone to tell
  44. me. Oh, by the way here's that code:
  45.  
  46.  
  47.  
  48.  
  49.  
  50. /* GETCH.C: This program reads characters from
  51.  * the keyboard until it receives a 'Y' or 'y'.
  52.  */
  53. #include <conio.h>
  54. #include <ctype.h>
  55. void main( void )
  56. {
  57.    int ch;
  58.    _cputs( "Type 'Y' when finished typing keys: " );
  59.    do
  60.    {
  61.       ch = _getch();
  62.       ch = toupper( ch );
  63.    } while( ch != 'Y' );
  64.    _putch( ch );
  65.    _putch( '\r' );    /* Carriage return */
  66.    _putch( '\n' );    /* Line feed       */
  67. }
  68.  
  69.  
  70.  
  71.  
  72. Obviously you know what this snippet is for. As far as I can tell it
  73. shouldn't have any errors. Well any information about what I could do
  74. to fix this problem would be greatly appreciated, thanks.
  75.  
  76.                                 -VR-
  77.